package com.pdstudio.carrecom.ui.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.pdstudio.carrecom.common.BaseFragment;
import com.pdstudio.carrecom.ui.activity.ActivitySelectBrands;
import com.pdstudio.carrecom.ui.activity.appointment.ActivityAppointDrive;
import com.pdstudio.carrecom.ui.activity.appointment.ActivityAppointFix;
import com.pdstudio.carrecom.R;

/**
 * 
 * 类: FragmentService <br>
 * 描述: 预约服务 <br>
 * 作者: ws  <br>
 * 时间: 2015-5-21 下午11:44:39
 */
public class FragmentService extends BaseFragment implements OnClickListener {
	
	private View customLiveIndexTitleView;
	private TextView txtTitle;
	private ImageView ivBack;
	
	private LinearLayout mAppointDrive,mAppointFix;//预约试驾或保养

	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		_view = inflater.inflate(R.layout.fragment_appointment_main, container,false);
		_context = getActivity();
		initTitle();
		initialView();
		return _view;
	}
	
	private void initTitle() {
		txtTitle = (TextView) _view.findViewById(R.id.title_text_nav);

		txtTitle.setText("预约服务");

		ivBack = (ImageView) _view.findViewById(R.id.title_back);
		ivBack.setVisibility(View.GONE);
		ivBack.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				//finish();				
			}
		});
	}

	
	private void initialView(){
		mAppointDrive=(LinearLayout)_view.findViewById(R.id.ll_appointment_drive);
		mAppointDrive.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(_context,ActivityAppointDrive.class);
				startActivity(intent);
			}});
		mAppointFix=(LinearLayout)_view.findViewById(R.id.ll_appointment_fix);
		mAppointFix.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent=new Intent(_context,ActivityAppointFix.class);
				startActivity(intent);
			}});
    }
	
	private void initData() {
         
    }
	
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		//Toast.makeText(_context.getApplicationContext(), v.getId()+"--"+v.toString(), 3000);

	}

}
